package router

import (
	"github.com/gin-gonic/gin"
	"go_api/api"
	"go_api/middleware"
)

func init() {
	RegisterRoute(func(engine *gin.Engine) {
		v1 := engine.Group("/v1")
		// 用户认证路由组
		group := v1.Group("/user")
		{
			group.POST("/upload", middleware.ApiMiddleware(), api.UserController{}.UploadImage)
			group.POST("/edit", middleware.ApiMiddleware(), api.UserController{}.EditUser)
			group.POST("/create", middleware.ApiMiddleware(), api.UserController{}.CreateUser)
		}
	})
}
